<form id="bind_form">
<table class="bind_form">
	<tr>
		<td class="col1">计费单元</td>
		<td class="col2"><?php echo $this->data['unit']['unit']; ?><input type="hidden" name="unit_id" value="<?php echo $this->data['unit']['id']; ?>" /></td>
	</tr>
	<tr>
		<td class="col1">已绑定域名</td>
		<td class="col2">
			<ul>
				<?php foreach ($this->data['bind_domain'] as $b) {?>
					<li><input name="domain[]" type="checkbox" value="<?php echo $b['id'];?>" /><?php echo $b['domain']; ?></li>
				<?php } ?>
			</ul>
		</td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" value="解除绑定" /></td>
	</tr>
</table>
</form>
<link href="/css/reset-min.css" rel="stylesheet" type="text/css"> 
<script type="text/javascript" src="/js/lib/jquery-1.6.2.min.js"></script> 
<script type="text/javascript" src="/js/lib/jquery.form.js"></script> 
<script>
$(document).ready(function(){
	$('#bind_form').submit(function() {
		var queryString = $(this).formSerialize();
		$.post('/domain/bind_undo', queryString, function(data){
			if (data.r == 'succ') {
				alert('操作成功');
				window.location.reload();
			} else {
				alert('操作失败' +  "\n>" +  data.msg.join("\n>"));
			}
		}, 'json');
		return false;
	});
});
</script>
<style>
.bind_form{
font-size:13px;
}
.bind_form td{
padding:5px;
text-align:left;
}
.bind_form li{
float:left;
list-style:none;
margin-right:5px;
}
.bind_form ul{
left:0px;
}
</style>

